home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / MacApp / Unsupported Samples / MacApp Drafter / Source / MacApp® Drafter.r < prev    next >
Encoding:
Text File  |  1990-07-13  |  6.2 KB  |  348 lines  |  [TEXT/MPS ]

  1. /* MacApp® Drafter                                        */
  2. /*                                                          */
  3. /* File: MacApp® Drafter.r                                */
  4. /*                                                          */
  5. /* A sample C++ program by Danie Underwood                */
  6. /*                                                        */
  7. /* Apple Integrated Systems                                */
  8. /*                                                        */
  9. /* ©1990 Apple Computer, Inc.  All rights reserved.        */
  10.  
  11.  
  12.  
  13. #ifndef __TYPES.R__
  14. #include "Types.r"
  15. #endif
  16.  
  17. #ifndef __SYSTYPES.R__
  18. #include "SysTypes.r"
  19. #endif
  20.  
  21. #ifndef __MacAppTypes__
  22. #include "MacAppTypes.r"
  23. #endif
  24.  
  25. #if qTemplateViews
  26. #ifndef __ViewTypes__
  27. #include "ViewTypes.r"
  28. #endif
  29. #endif
  30.  
  31. #if qDebug
  32. include "Debug.rsrc";
  33. #endif
  34.  
  35. include "MacApp.rsrc";
  36. include "Dialog.rsrc";
  37. include "Printing.rsrc";
  38.  
  39. include $$Shell("ObjApp")"MacApp® Drafter" 'CODE';
  40.  
  41. include $$Shell("SrcApp")"MacApp® Drafter.resources";
  42. #include $$Shell("SrcApp")"MacApp® DrafterViews.r";
  43.  
  44. type 'Text' {
  45.     cstring;
  46. };
  47.  
  48. #define    rText    'Text'
  49.  
  50.  
  51. #include $$Shell("SrcApp")"MacApp® DrafterData.r";
  52.  
  53.  
  54.  
  55. #define    kHierDisplayedMBar    131            /* MenuBar on hierarchical menu system */
  56. #define    kDrafterStrings        10000
  57.  
  58. #define kSignature            'HELP'        /* Application signature */
  59.  
  60. resource 'SIZE' (-1) {
  61.     saveScreen,
  62.     acceptSuspendResumeEvents,
  63.     enableOptionSwitch,
  64.     canBackground,
  65.     MultiFinderAware,
  66.     backgroundAndForeground,
  67.     dontGetFrontClicks,
  68.     ignoreChildDiedEvents,
  69.     is32BitCompatible,
  70.     reserved,
  71.     reserved,
  72.     reserved,
  73.     reserved,
  74.     reserved,
  75.     reserved,
  76.     reserved,
  77. #if qdebug
  78.     1500 * 1024,
  79.     800 * 1024
  80. #else
  81.     900 * 1024,
  82.     500 * 1024
  83. #endif
  84. };
  85.  
  86. /*    Printing to the LaserWriter is the time when the most temporary memory
  87.     is in use.  We need the segments in use at that time */
  88.  
  89. resource 'seg!' (256, purgeable) {
  90.     {
  91.         "GWriteFile";
  92.         "GClipboard";
  93.         "GNonRes";
  94.         "GFile";
  95.         "GSelCommand";
  96.         "GTerminate";
  97.         "GClose";
  98.         "GDoCommand";
  99.     }
  100. };
  101.  
  102. resource 'DITL' (phAboutApp, purgeable) {
  103.      {
  104.             {160, 182, 180, 262},
  105.             Button {
  106.                 enabled,
  107.                 "OK"
  108.             };
  109.             {10, 75, 150, 320},
  110.             StaticText {
  111.                 disabled,
  112.                     "MacApp® Drafter, a MacApp sample.\n"
  113.                     "by Danie Underwood—Apple Integrated Systems\n"
  114.                     "Apple Computer, Inc.\n"
  115.                     "\nThis program was written with MacApp® ©1985-1990 Apple Computer, Inc."
  116.             };
  117.             {10, 20, 42, 52},
  118.             Icon {
  119.                 disabled,
  120.                 1
  121.             }
  122.     }
  123. };
  124.  
  125. resource 'ALRT' (phAboutApp,
  126. #if qNames
  127. "phAboutApp",
  128. #endif
  129.     purgeable) {
  130.     {90, 80, 280, 482},
  131.     phAboutApp,
  132.     {
  133.         OK, visible, silent;
  134.         OK, visible, silent;
  135.         OK, visible, silent;
  136.         OK, visible, silent
  137.     }
  138. };
  139.  
  140.  
  141. include "Defaults.rsrc" 'cmnu' (mApple);        // Grab the default Apple/File menus
  142. include "Defaults.rsrc" 'cmnu' (mFile);
  143.  
  144. resource 'cmnu' (mEdit) {
  145.     mEdit,
  146.     textMenuProc,
  147.     AllEnabled,
  148.     enabled,
  149.     "Edit",
  150.      {
  151. /* [ 1] */    "Undo",                noIcon,    "Z",    noMark,    plain,    cUndo;
  152. /* [ 2] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  153. /* [ 3] */    "Cut",                noIcon,    "X",    noMark,    plain,    cCut;
  154. /* [ 4] */    "Copy",                noIcon,    "C",    noMark,    plain,    cCopy;
  155. /* [ 5] */    "Paste",            noIcon,    "V",    noMark,    plain,    cPaste;
  156. /* [ 6] */    "Clear",            noIcon,    noKey,    noMark,    plain,    cClear;
  157. /* [ 7] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  158. /* [ 8] */    "Select All",        noIcon,    "A",    noMark,    plain,    cSelectAll;
  159. /* [ 9] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  160. /* [10] */    "Show Clipboard",    noIcon,    noKey,    noMark,    plain,    cShowClipboard
  161.     }
  162. };
  163.  
  164. /* Displayed menus on a non-hierarchical system */
  165. resource 'MBAR' (kMBarDisplayed) {
  166.     {mApple; mFile; mEdit}
  167. };
  168.  
  169. /* Displayed menus on a hierarchical system */
  170. resource 'MBAR' (kHierDisplayedMBar) {
  171.     {mApple; mFile; mEdit}
  172. };
  173.  
  174. resource 'STR#' (kDefaultCredits,
  175. #if qNames
  176.     "kDefaultCredits",
  177. #endif
  178.     purgeable) {
  179.      {
  180.      "Special thanks to Ed Wischmeyer (Ed’s Airlines)";
  181.      " . . . and . . .";
  182.  
  183.     "The great people behind MacApp®…";
  184.  
  185.     "Engineers past and present…";
  186.     "Peter Alley";
  187.     "Curt Bianchi";
  188.     "Mary Boetcher";
  189.     "Ken Doyle";
  190.     "Steve Friedrich";
  191.     "David Goldsmith";
  192.     "Barry Haynes";
  193.     "Chris Knepper";
  194.     "Lonnie Millett";
  195.     "Deb Orton";
  196.     "Larry Rosenstein";
  197.     "Larry Tesler";
  198.     "Scott Wallace";
  199.     "Russ Wetmore";
  200.  
  201.     "Testers past and present…";
  202.     "Dan Allen";
  203.     "John Beswetherick";
  204.     "Cliff Greyson";
  205.     "Richard Kimberly";
  206.     "Kuldip Nijjar";
  207.     "Richard Rodseth";
  208.  
  209.     "Writers past and present…";
  210.     "Dave Bice";
  211.     "Mikel Evins";
  212.     "Bill Harris";
  213.     "Marq Laube";
  214.     "John Perry";
  215.     "Don Reed";
  216.     "Jon Simonoff";
  217.     "Jon Singer";
  218.     "Alan Spragens";
  219.     "Andy Swartz";
  220.  
  221.     "Technical support past and present…";
  222.     "Darin Adler";
  223.     "Mark Bennett";
  224.     "Rick Blair";
  225.     "Clarus™ the DogCow™ (Moof™!)";
  226.     "Bo3b Johnson";
  227.     "Keith Rollin";
  228.     "Andrew Shebanow";
  229.  
  230.     "Configuration Management…";
  231.     "Gary Davis";
  232.     "Ming Low";
  233.  
  234.     "Product Managers past and present…";
  235.     "Harvey Alcabes";
  236.     "Steve Burbeck";
  237.  
  238.     "Managers…";
  239.     "David Goldsmith (yes, he was a manager too!)";
  240.     "Phac LeTuan";
  241.     "Ron Metzker";
  242.     "Jim Thomas";
  243.  
  244.     "Evangelizers…";
  245.     "Scott Knaster";
  246.     "Jon Magill";
  247.     "Gregg Williams";
  248.  
  249.     "MacApp Developers Association…";
  250.     "Bill Anderson";
  251.     "Howard Katz";
  252.     "Carl Nelson";
  253.     "(206) 252-6946";
  254.  
  255.     "Other great people…";
  256.     "Rob Chandhok & John Pane @ Carnegie Mellon University";
  257.     "Dan Cochran";
  258.     "Eileen Crombie";
  259.     "Patricia Eastman";
  260.     "Ann Greyson";
  261.     "Michael Hinkson";
  262.     "Mark Lentczner";
  263.     "Eileen Mayes";
  264.     "Mom and Dad";
  265.     "Kurt Schmucker";
  266.     "Harry Yee";
  267.     "Geri Younggren";
  268.     "You, the billions and billions of MacApp® programmers";
  269.  
  270.     "THE MacApp teachers…";
  271.     "Neal Goldstein";
  272.     "Neil Rhodes";
  273.     "Dave Wilson";
  274.  
  275.     "And because he insisted on being included…";
  276.     "Eagle I. Berns"
  277.  
  278.      }
  279. };
  280.  
  281. resource 'STR#' (kDrafterStrings,purgeable) {
  282.      {
  283.          "MacApp® Drafter";
  284.         ""
  285.     }
  286. };
  287.  
  288. resource 'BNDL' (128,
  289. #if qNames
  290. "Drafter",
  291. #endif
  292.     purgeable) {
  293.     kSignature,
  294.     0,
  295.     {
  296.         'ICN#',
  297.         {0,128},
  298.         'FREF',
  299.         {0,128}
  300.     }
  301. };
  302.  
  303. type kSignature as 'STR ';
  304. resource kSignature (0,
  305. #if qNames
  306. "Signature",
  307. #endif
  308.     purgeable) {
  309.     "MacApp Drafter 1.0\nBy Danie Underwood\nApple Integrated Systems\n©1990 Apple Computer, Inc."
  310. };
  311.  
  312. // Get the default MacApp® application icon and file reference
  313. include "Defaults.rsrc"  'FREF' (128);
  314.  
  315. // Version for the "application or file"
  316. RESOURCE 'vers' (1,
  317. #if qNames
  318.     "Application Version",
  319. #endif
  320.     purgeable) {
  321.     0x01,
  322.     0x00,
  323.     final,
  324.     0x00,
  325.     verUs,
  326.     "1.0",
  327.     "1.0, MacApp® Drafter [a sample program]"
  328. };
  329.  
  330. include "Defaults.rsrc"  'vers' (2);        // Overall package
  331.  
  332. type 'RGB#' {
  333.     array RGBList {
  334.         wide array ColorSpec {
  335.                 unsigned integer;        // RGB:    red
  336.                 unsigned integer;        //        green
  337.                 unsigned integer;        //        blue
  338.         };
  339.     };
  340. };
  341.  
  342. resource 'RGB#' (1001,purgeable) {
  343.     {
  344.          {0xDAFF,0xC909,0x2847}        //Sort of brassy, goldy, yucky…
  345.     }
  346. };
  347.  
  348.